/*
 * Copyright (c) 2020, 2023, 3044483124@qq.com All rights reserved.
 *
 */
package cn.itcast;

/**
 * <p>Project: JavaStudy - Var2
 * <p>Powered by jiangbo On 2023-01-30
 * 21:16:07
 * <p>Created by IntelliJ IDEA
 *
 * @author jiangbo [3044483124@qq.com]
 * @version 1.0
 * @since 8/17
 */
public class Var2 {
    public static void main(String[] args) {
//8大基本类型
//byte 1字节 -128-127
        byte a = 127;

//short 2字节
        short b = 2000;
//int 4字节
        int c = 127;
//long 8字节
        long d = 127;
//自动类型转换
        float f1 = 10;
        float f2 = 10f;
        float f3 = 10F;
        float f4 = .5f;
        System.out.println(f1);
        System.out.println(f2);
        System.out.println(f3);
        System.out.println(f4);

        //强制类型
        float f5 = (float).5;
        double e = .5;
        double h = 55;
        System.out.println(e);
        System.out.println(h);
//布尔类型 true false
        boolean f = !!!true == false;
        System.out.println(f);
//char字符型，底层相当于ascii数字整数
        char c1 = 'a';
        char c2 = 65;
        char c3 = 'G';
        int gg = 'G';
        int i = 'a';

//a
        System.out.println(c1);
//A
        System.out.println(c2);
//G
        System.out.println(gg+" G的ascii数字整数");
//97
        System.out.println(i+" a的ascii数字整数");

//类型的修饰符 Ll Ff Dd
//8字节
        long num = 2L;
//4字节
        float flo = .5F;
//8字节
        double dou = 100;

    }

}


